package com.yyaccp.appinfo.controller;

import com.yyaccp.appinfo.service.DataService;
import com.yyaccp.appinfo.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 天天向上 （john.yi@qq.com）
 * @date 2020/11/25.
 */
@RestController
@RequestMapping("/api/data")
public class DataController {
    @Autowired
    private DataService dataService;

    @GetMapping("/search")
    public AjaxResult search(String typeCode) {
        return AjaxResult.success(dataService.search(typeCode));
    }
}
